package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.entity.BaseTrademark;
import com.atguigu.gmall.product.service.BaseTrademarkService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/product/")
public class TrademarkController {

    @Autowired
    BaseTrademarkService baseTrademarkService;


    @GetMapping("/baseTrademark/{pn}/{ps}")
    public Result baseTrademark(@PathVariable("pn")  Long pn,
                                                  @PathVariable("ps")  Long ps){

        Page<BaseTrademark> page = new Page<>(pn,ps);
        //分页查询
        Page<BaseTrademark>  result = baseTrademarkService.page(page);

        return Result.ok(result);
    }
}
